FROM nginx:stable-alpine

# 设置应用工作目录
WORKDIR /app

# 将所有文件拷贝到容器中
COPY ./dist /app/dist

COPY nginx.conf /etc/nginx/nginx.conf

RUN chmod -R 777 /app/dist

# 添加 www-data 用户
RUN set -x ;   addgroup -g 82 -S www-data ;     adduser -u 82 -D -S -G www-data www-data && exit 0 ; exit 1

# 暴露端口
EXPOSE 8080

CMD ["nginx", "-g", "daemon off;"]
